Skip to content

feat(config)!: expose DocumentTracker resource limits via workspace config - #324

Merged
bug-ops merged 1 commit into
mainfrom
feat/issue-315/expose-document-tracker-limits
Aug 5, 2026
Merged

feat(config)!: expose DocumentTracker resource limits via workspace config#324
bug-ops merged 1 commit into
mainfrom
feat/issue-315/expose-document-tracker-limits

Conversation

@bug-ops

@bug-ops bug-ops commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add workspace.max_documents/workspace.max_file_size TOML config fields so operators can raise DocumentTracker's previously hardcoded caps (100 open documents, 10MB max file size) for larger or longer-running agent sessions. 0 disables either limit; omitting a field preserves today's defaults. WorkspaceConfig::resource_limits() maps the fields onto bridge::ResourceLimits, and a new Translator::with_resource_limits builder wires the resolved limits into serve()'s Translator construction alongside the existing with_extensions builder — the two now read each other's already-set field when rebuilding document_tracker, so they compose in either order without one silently discarding the other's effect. DocumentLimitExceeded/FileSizeLimitExceeded error messages gained a static hint pointing at the relevant config field.
  • Rename NotificationCache::get_logs/get_messages to logs/messages, dropping the redundant get_ prefix per the Rust API Guidelines (get_diagnostics is a keyed lookup and is unchanged).

Breaking changes

  • NotificationCache::get_logs/get_messages renamed to logs/messages.
  • ResourceLimits is now re-exported from bridge (previously private to bridge::state), making the already-pub DocumentTracker::new constructible from outside the crate for the first time.

Test plan

  • cargo +nightly fmt --all -- --check
  • cargo clippy --all-targets --all-features --workspace -- -D warnings
  • cargo nextest run --workspace --all-features --lib --bins (653 passed, 1 skipped)
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
  • New unit tests: TOML defaults/overrides, max_file_size: 0 unlimited, resource_limits() mapping, TOML round-trip, Translator::with_resource_limits/with_extensions order-independence (verified via language resolution through a non-empty extension map, not just the limit value)
  • Updated docs/user-guide/configuration.md and CHANGELOG.md

Closes #315, closes #293

…onfig

Add workspace.max_documents and workspace.max_file_size TOML fields so
operators can raise DocumentTracker's previously hardcoded caps (100 open
documents, 10MB max file size) for larger or longer-running agent sessions.
0 disables either limit; omitting a field preserves today's defaults.
WorkspaceConfig::resource_limits() maps the fields onto bridge::ResourceLimits,
and a new Translator::with_resource_limits builder wires the resolved limits
into serve()'s Translator construction. That builder and the existing
with_extensions builder now read each other's already-set field when
rebuilding document_tracker, so they compose in either order without one
silently discarding the other's effect. DocumentLimitExceeded and
FileSizeLimitExceeded error messages gained a static hint pointing at the
relevant config field.

Also rename NotificationCache::get_logs/get_messages to logs/messages,
dropping the redundant get_ prefix per the Rust API Guidelines
(get_diagnostics is a keyed lookup and is unchanged).

BREAKING CHANGE: NotificationCache::get_logs/get_messages renamed to
logs/messages. ResourceLimits is now re-exported from bridge (previously
private to bridge::state), making the already-pub DocumentTracker::new
constructible from outside the crate for the first time.

Closes #315, closes #293
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes mcpls-core mcpls-core crate changes labels Aug 5, 2026
@bug-ops
bug-ops enabled auto-merge (squash) August 5, 2026 02:29
@bug-ops
bug-ops merged commit e7a4dfe into main Aug 5, 2026
50 of 52 checks passed
@bug-ops
bug-ops deleted the feat/issue-315/expose-document-tracker-limits branch August 5, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation mcpls-core mcpls-core crate changes rust Rust code changes

Projects

None yet

1 participant